home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The X-Philes (2nd Revision)
/
The X-Philes Number 1 (1995).iso
/
xphiles
/
hp48hor1
/
hp42s.src
< prev
next >
Wrap
Text File
|
1990-10-17
|
2KB
|
40 lines
%%HP: T(3)A(D)F(.);
@ by Joseph K. Horn
DIR
TR42 @ Translates 42 INPRT'ed program into ->41'able form.
\<< DUP "}" POS 2 + MAXR SUB @ remove line 00
1 TAB42 SIZE @ loop through 42 lookup table
FOR n 'TAB42' n GET @ fetch next command pair
EVAL REPLACE @ global search & replace
NEXT @ leave translated string on stack.
\>>
TAB42 { @ lookup table of { 42 41 } commands
{ "+/-" "CHS" } @ change sign
{ "\->DEC" "DEC" } @ octal to decimal
{ "\->RAD" "D-R" } @ degrees to radians
{ "ENTER" "ENTER\|^" } @ add up-arrow to ENTER
{ "N!" "FACT" } @ factorial
{ "FP" "FRC" } @ fractional part
{ "\->HMS" "HMS" } @ decimal hours to H.MMSS
{ "\->HR" "HR" } @ H.MMSS to decimal hours
{ " IP" " INT" } @ integer part (leading space for AIP)
{ "\->OCT" "OCT" } @ decimal to octal
{ "\->REC" "P-R" } @ polar to rectangular
{ "Rv" "RDN" } @ roll down
{ "\->DEG" "R-D" } @ radians to degrees
{ "\->POL" "R-P" } @ rectangular to polar
{ "STO+" "ST+" } @\
{ "STO-" "ST-" } @ \ storage
{ "STO\.x" "ST*" } @ / arithmetic
{ "STO\:-" "ST/" } @/
{ "X\<=0?" "X<=0?" } @\ special "<=" sign
{ "X\<=Y?" "X<=Y?" } @/
{ "\.x" "*" } @ multiply
{ "\:-" "/" } @ divide
{ " ST " " " } @ stack register
{ "\004" "\010" } @ printer newlines -> real newlines
{ C$ 1 " "'" } @ double-quotes -> single-quotes
{ "\|>" " " } @ delete LBL blobs
}
END